import {useState,useEffect} from 'react'
import {useLocation,useNavigate,Outlet} from 'react-router-dom'
// import axios from 'axios'

import { Flex , Radio, Tabs} from 'antd';
import type { TabsProps } from 'antd';


import DocIssue from '../wycomponentpage/prescription.tsx'
import Inspect from '../wycomponentpage/inspect.tsx'
import Tests from '../wycomponentpage/test.tsx'


let dociss = {
    width:'100%',
    height:'100%',
    borderRadius: 6,
    // border:'1px solid green',
}

const initialItems = [
  {label: '处方', children: <DocIssue></DocIssue>, key: '1' },
  {label: '检查', children: <Inspect></Inspect>, key: '2' },
  {label: '检验',children: <Tests></Tests>,key: '3'},
];



export default function DoctorIssue(){//医嘱开具

    const [size, setSize] = useState<'small' | 'middle' | 'large'>('small');
    const [items, setItems] = useState(initialItems);
    const [activeKey, setActiveKey] = useState(initialItems[0].key);

    const onChange = (newActiveKey: string) => {
        setActiveKey(newActiveKey);
        console.log(newActiveKey)
    };

    useEffect(()=>{

    },[])

    return (
        <>
                <Tabs
                    defaultActiveKey="1"
                    onChange={onChange}
                    // activeKey={activeKey}
                    type="card"
                    size={size}
                    style={dociss}
                    items={items}
                />
            

        </>
    )
}